<script>
export default {
  props: {
    userData: {
      type: Object,
      default: {}
    },
  },
  data() {
    return {

    }
  }
}
</script>

<template>
  <div class="page">
    <el-row>
      <el-descriptions title="职工基本信息" :column="1" border>
        <el-descriptions-item :contentStyle="{'font-size': '2rem'}">
          <template slot="label">
            <i class="el-icon-user"></i>
            用户名
          </template>
          {{ userData.nickName}}
        </el-descriptions-item>
        <el-descriptions-item :contentStyle="{'font-size': '1.5rem'}">
          <template slot="label">
            <i class="el-icon-mobile-phone"></i>
            工号
          </template>
          {{ userData.userName }}
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-tickets"></i>
            工种
          </template>
          <el-tag size="small">
            电焊工
          </el-tag>
        </el-descriptions-item>
        <el-descriptions-item>
          <template slot="label">
            <i class="el-icon-office-building"></i>
            所属部门
          </template>
          <el-tag size="small">
            {{ userData.dept.deptName}}
          </el-tag>
        </el-descriptions-item>
      </el-descriptions>
    </el-row>
  </div>
</template>

<style scoped lang="scss">
.page {
  padding: 18px;
}
</style>
